﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace CodeAngel.Domain.Framework
{

    #region IDto

    /// <summary>
    /// Interface into all DTO classes.
    /// </summary>
    public interface IDto
    {
        /// <summary>
        /// Gets the unique identifier for this DTO.
        /// </summary>
        Guid ID { get; }

        /// <summary>
        /// Gets or sets the state of this DTO.
        /// </summary>
        DtoChangedState State { get; set; }

        /// <summary>
        /// Gets or sets the TimeStamp the last time this DTO was read from the database.
        /// </summary>
        byte[] TimeStamp { get; set; }

    }

    public enum DtoChangedState 
    {
        Unchanged,
        New,
        Modified,
        Deleted 
    }

    #endregion

}
